<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><script>(()=>{const e=navigator.serviceWorker;e?e.register("/sw.js").then((async e=>{console.log("SWPP 注册成功");try{await e.periodicSync.register("update",{minInterval:864e5})}catch(e){console.log("Periodic Sync 注册失败",e)}})).catch((e=>console.error("SWPP 注册失败",e))):console.warn("当前浏览器不支持 SW")})()</script><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><title>Shynet：极为轻量化的访客监控系统 | LiuShen's Blog</title><meta name="author" content="LiuShen"><meta name="copyright" content="LiuShen"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="robots" content="index, follow"><meta name="description" content="在先前，我曾推荐过一款访客系统：Umami，不过部署Umami需要部署两个容器，一个是PostgreSQL，一个是Umami本体，这两个占用都超过了200MB，奈何陋室空间有限，只能忍痛放弃，终于在今天找到了一个更加轻量化的统计：Shynet，在此推荐给大家。"><meta property="og:type" content="article"><meta property="og:title" content="Shynet：极为轻量化的访客监控系统"><meta property="og:url" content="https://blog.liushen.fun/posts/7cb13402/"><meta property="og:site_name" content="LiuShen's Blog"><meta property="og:description" content="在先前，我曾推荐过一款访客系统：Umami，不过部署Umami需要部署两个容器，一个是PostgreSQL，一个是Umami本体，这两个占用都超过了200MB，奈何陋室空间有限，只能忍痛放弃，终于在今天找到了一个更加轻量化的统计：Shynet，在此推荐给大家。"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://p.liiiu.cn/i/2024/04/23/6627d3c9c9d7c.png"><meta property="article:published_time" content="2024-04-24T16:24:00.000Z"><meta property="article:modified_time" content="2024-04-25T01:15:00.000Z"><meta property="article:author" content="LiuShen"><meta property="article:tag" content="网站监控"><meta property="article:tag" content="Shynet"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://p.liiiu.cn/i/2024/04/23/6627d3c9c9d7c.png"><link rel="shortcut icon" href="/favicon.ico"><link rel="canonical" href="https://blog.liushen.fun/posts/7cb13402/"><link rel="preconnect" href="https://jsd.liiiu.cn"><meta name="baidu-site-verification" content="codeva-i2bF9bXDJs"><meta name="sogou_site_verification" content="1rIjtK6RhE"><meta name="360-site-verification" content="b9a9f96ae38a1932a326f8ba255cc74b"><meta name="msvalidate.01" content="F7C246820EB04DD140494C98F93A97C7"><meta name="google-site-verification" content="VH3ZE6m42MZDqpTY2tD-XoxDt9iUj2HoiC3W2neB7F4"><link rel="manifest" href="/manifest.json"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/config/img/pwa/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/config/img/pwa/favicon-16x16.png"><link rel="mask-icon" href="/config/img/pwa/favicon-mask.svg" color="#5bbad5"><link rel="stylesheet" href="/css/index.css?v=5.0.0"><link rel="stylesheet" href="/css/custom.css?v=5.0.0"><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/@fortawesome/fontawesome-free@6.7.2/css/all.min.css"><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/@fancyapps/ui@5.0.36/dist/fancybox/fancybox.min.css" media="print" onload='this.media="all"'><script>(()=>{const e={set:(e,t,o)=>{if(!o)return;const n=Date.now()+864e5*o;localStorage.setItem(e,JSON.stringify({value:t,expiry:n}))},get:e=>{const t=localStorage.getItem(e);if(!t)return;const{value:o,expiry:n}=JSON.parse(t);if(!(Date.now()>n))return o;localStorage.removeItem(e)}};window.btf={saveToLocal:e,getScript:(e,t={})=>new Promise(((o,n)=>{const a=document.createElement("script");a.src=e,a.async=!0,Object.entries(t).forEach((([e,t])=>a.setAttribute(e,t))),a.onload=a.onreadystatechange=()=>{a.readyState&&!/loaded|complete/.test(a.readyState)||o()},a.onerror=n,document.head.appendChild(a)})),getCSS:(e,t)=>new Promise(((o,n)=>{const a=document.createElement("link");a.rel="stylesheet",a.href=e,t&&(a.id=t),a.onload=a.onreadystatechange=()=>{a.readyState&&!/loaded|complete/.test(a.readyState)||o()},a.onerror=n,document.head.appendChild(a)})),addGlobalFn:(e,t,o=!1,n=window)=>{const a=n.globalFn||{};a[e]=a[e]||{},o&&a[e][o]||(a[e][o||Object.keys(a[e]).length]=t,n.globalFn=a)}};const t=()=>{document.documentElement.setAttribute("data-theme","dark"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#0d0d0d")},o=()=>{document.documentElement.setAttribute("data-theme","light"),null!==document.querySelector('meta[name="theme-color"]')&&document.querySelector('meta[name="theme-color"]').setAttribute("content","#ffffff")};btf.activateDarkMode=t,btf.activateLightMode=o;const n=e.get("theme"),a=(new Date).getHours();void 0===n?a<=6||a>=18?t():o():"light"===n?o():t();const r=e.get("aside-status");void 0!==r&&document.documentElement.classList.toggle("hide-aside","hide"===r);/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)&&document.documentElement.classList.add("apple")})()</script><script>const GLOBAL_CONFIG={root:"/",algolia:{appId:"7IX3UBC6JW",apiKey:"4ac2846352e499675081f1277fb961c1",indexName:"My Blog",hitsPerPage:6,languages:{input_placeholder:"搜索全站文章",hits_empty:"未找到符合您查询的内容：${query}",hits_stats:"找到 ${hits} 条结果，耗时 ${time} 毫秒"}},localSearch:void 0,translate:{defaultEncoding:2,translateDelay:0,msgToTraditionalChinese:"繁",msgToSimplifiedChinese:"簡"},noticeOutdate:{limitDay:365,position:"top",messagePrev:"本篇文章从发布到现在已经隔了",messageNext:"天了，里面的内容可能过期了，你要自己甄别一下哟👉👈"},highlight:{plugin:"highlight.js",highlightCopy:!0,highlightLang:!0,highlightHeightLimit:400,highlightFullpage:!1,highlightMacStyle:!0},copy:{success:"😋复制啦！请注意版权信息呀！",error:"😪呜呜，复制失败了！",noSupport:"🤐浏览器不支持呢，你用的啥玩意？"},relativeDate:{homepage:!1,post:!1},runtime:"天",dateSuffix:{just:"刚刚",min:"分钟前",hour:"小时前",day:"天前",month:"个月前"},copyright:{limitCount:1e3,languages:{author:"作者: LiuShen",link:"链接: ",source:"来源: LiuShen's Blog",info:"著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。"}},lightbox:"fancybox",Snackbar:{chs_to_cht:"已切换为繁体中文",cht_to_chs:"已切换为简体中文",day_to_night:"已切换为深色模式",night_to_day:"已切换为浅色模式",bgLight:"rgba(255, 255, 255, 0.509)",bgDark:"rgba(48, 48, 48, 0.509)",position:"top-right"},infinitegrid:{js:"https://jsd.liiiu.cn/npm/@egjs/infinitegrid@4.12.0/dist/infinitegrid.min.js",buttonText:"加载更多"},isPhotoFigcaption:!0,islazyload:!0,isAnchor:!1,percent:{toc:!0,rightside:!1},autoDarkmode:!1}</script><script id="config-diff">var GLOBAL_CONFIG_SITE={title:"Shynet：极为轻量化的访客监控系统",isPost:!0,isHome:!1,isHighlightShrink:void 0,isToc:!0,postUpdate:"2024-04-25 09:15:00"}</script><link rel="stylesheet" href="https://jsd.liiiu.cn/gh/willow-god/Sharding-fonts/Yozai-Medium/result.min.css"><link rel="stylesheet" href="/config/memos/memos.css"><script defer src="/sw-dom.js"></script><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/swiper@11.1.14/swiper-bundle.min.css" media="print" onload='this.media="all"'><link rel="stylesheet" href="/config/swiper/swiperstyle.css" media="print" onload='this.media="all"'><meta name="generator" content="Hexo 7.3.0"><link rel="alternate" href="/atom.xml" title="LiuShen's Blog" type="application/atom+xml"></head><body><div class="float-box right top"></div><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><img class="load-image" src="" data-lazy-src="/config/img/preloader.gif" alt=""></div><script async>(()=>{const e=document.getElementById("loading-box"),d=document.body,t=()=>{d.style.overflow="",e.classList.add("loaded")},n=()=>{d.style.overflow="hidden",e.classList.remove("loaded")};n();let o=!1;window.addEventListener("load",(()=>{o||(t(),o=!0)})),setTimeout((()=>{o||(t(),o=!0)}),5e3),window.addEventListener("load",(()=>{t()})),setTimeout((function(){t()}),3e3),document.getElementById("loading-box").addEventListener("click",(()=>{t()})),document.addEventListener("pjax:send",(()=>{n()})),document.addEventListener("pjax:complete",(()=>{t()}))})()</script><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="add-menu-container"><div id="travellings"><a class="site-page" href="https://www.travellings.cn/go.html" title="友链接力-随机开往" target="_blank" rel="noopener nofollow"><i class="fa-solid fa-bus fa-fw"></i></a></div><div id="ten-years"><a class="site-page" href="https://foreverblog.cn/go.html" title="友链接力-十年之约" target="_blank" rel="noopener nofollow"><i class="fa-brands fa-nfc-symbol fa-fw"></i></a></div></div><div class="is-center" id="sidebar-avatar"><div class="avatar-img is-center"><img class="mood-icon" src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/14/67d301461a24a.webp" alt="🤤" onerror='this.onerror=null,this.src="/img/friend_404.gif"'><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/13/67d2fc82d329c.webp" onerror='this.onerror=null,this.src="/img/friend_404.gif"' alt="avatar"></div><div class="author-info__name">LiuShen</div></div><div class="site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">72</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">98</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">3</div></a></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/willow-god"><i class="fab fa-github"></i><span>Follow Me 🛫</span></a><div class="menus_items visible"><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fas fa-home"></i> <span>导航</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.liushen.fun/"><i class="fa-fw fa-solid fa-house-flag"></i> <span>个人主页</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://xc.liushen.fun/"><i class="fa-fw fa fa-camera-retro"></i> <span>个人相册</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-graduation-cap"></i> <span>整理</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i> <span>时光卷轴</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i> <span>文章标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i> <span>文章分类</span></a></li><li><a class="site-page child" href="/charts/"><i class="fa-fw fa-solid fa-chart-pie"></i> <span>文章通览</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-user-group"></i> <span>友人</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i> <span>友链展示</span></a></li><li><a class="site-page child" href="/addlink/"><i class="fa-fw fa fa-at"></i> <span>友链申请</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fa-solid fa-circle-nodes"></i> <span>朋友动态</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-paper-plane"></i> <span>留言</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/comment/"><i class="fa-fw fa-solid fa-chalkboard"></i> <span>留言白板</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://mm.liushen.fun/"><i class="fa-fw fa-solid fa-pen-nib"></i> <span>提笔摘星</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-stethoscope"></i> <span>分享</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gist.liushen.fun/"><i class="fa-fw fa-solid fa-code"></i> <span>代码片段</span></a></li><li><a class="site-page child" href="/subscribe/"><i class="fa-fw fa-solid fa-rss"></i> <span>订阅本站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://pan.liushen.fun/"><i class="fa-fw fa-solid fa-laptop-file"></i> <span>清羽云盘</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-list"></i> <span>关于</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-address-card"></i> <span>站长资料</span></a></li><li><a class="site-page child" href="/shuoshuo/"><i class="fa-fw fa fa-commenting"></i> <span>日常说说</span></a></li><li><a class="site-page child" href="/devices/"><i class="fa-fw fa-solid fa-tachograph-digital"></i> <span>我的设备</span></a></li></ul></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg fixed" id="page-header" style="background-image:url(https://p.liiiu.cn/i/2024/04/23/6627d3c9c9d7c.png)"><nav id="nav"><div class="more-app-btn"><i class="fa-solid fa-fingerprint fa-fw"></i><div class="more-app-list-groups"><div class="more-app-list-groups-container"><div class="more-app-list-group"><div class="more-app-list-title">🦄常用网站</div><div class="more-app-list"><a class="more-app-list-item" href="https://www.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-house"></i><span class="more-app-item-text">个人主页</span></a><a class="more-app-list-item" href="https://blog.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-blog"></i><span class="more-app-item-text">个人博客</span></a><a class="more-app-list-item" href="https://xc.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-image"></i><span class="more-app-item-text">个人相册</span></a><a class="more-app-list-item" href="https://github.com/willow-god" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-brands fa-github"></i><span class="more-app-item-text">Github</span></a></div></div><div class="more-app-list-group"><div class="more-app-list-title">😎周边站点</div><div class="more-app-list"><a class="more-app-list-item" href="https://gist.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-code"></i><span class="more-app-item-text">代码片段</span></a><a class="more-app-list-item" href="https://mm.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-pen-nib"></i><span class="more-app-item-text">提笔摘星</span></a><a class="more-app-list-item" href="https://pan.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-cloud"></i><span class="more-app-item-text">清羽云盘</span></a><a class="more-app-list-item" href="https://um.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-people-group"></i><span class="more-app-item-text">访客统计</span></a><a class="more-app-list-item" href="https://img.liiiu.cn/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-images"></i><span class="more-app-item-text">清羽图床</span></a><a class="more-app-list-item" href="https://chat.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-robot"></i><span class="more-app-item-text">清羽AI</span></a><a class="more-app-list-item" href="https://bsz.liiiu.cn/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-chart-pie"></i><span class="more-app-item-text">不蒜计数</span></a><a class="more-app-list-item" href="https://status.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-server"></i><span class="more-app-item-text">服务检测</span></a></div></div><div class="more-app-list-group"><div class="more-app-list-title">🚁实用工具</div><div class="more-app-list"><a class="more-app-list-item" href="https://tmail.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-envelope"></i><span class="more-app-item-text">临时邮箱</span></a><a class="more-app-list-item" href="https://hot.liushen.fun/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-fire"></i><span class="more-app-item-text">每日热榜</span></a><a class="more-app-list-item" href="https://cover.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-eye"></i><span class="more-app-item-text">封面设计</span></a><a class="more-app-list-item" href="https://mini-cover.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-image"></i><span class="more-app-item-text">迷你封面</span></a><a class="more-app-list-item" href="https://icon.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-icons"></i><span class="more-app-item-text">万能图标</span></a><a class="more-app-list-item" href="https://draw.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-paintbrush"></i><span class="more-app-item-text">灵感白板</span></a><a class="more-app-list-item" href="https://mindmap.qyliu.top/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-network-wired"></i><span class="more-app-item-text">思维导图</span></a><a class="more-app-list-item" href="https://share.liushen.fun/#/" rel="nofollow noopener" target="_blank"><i class="more-app-item-icon fa-solid fa-share-nodes"></i><span class="more-app-item-text">内容中转</span></a></div></div></div></div></div><span id="blog-info"><a class="nav-site-title" href="/" title="LiuShen's Blog"><span class="site-name">LiuShen</span></a></span><div id="menus"></div><div class="menus_items visible"><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fas fa-home"></i> <span>导航</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://www.liushen.fun/"><i class="fa-fw fa-solid fa-house-flag"></i> <span>个人主页</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://xc.liushen.fun/"><i class="fa-fw fa fa-camera-retro"></i> <span>个人相册</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-graduation-cap"></i> <span>整理</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/archives/"><i class="fa-fw fas fa-archive"></i> <span>时光卷轴</span></a></li><li><a class="site-page child" href="/tags/"><i class="fa-fw fas fa-tags"></i> <span>文章标签</span></a></li><li><a class="site-page child" href="/categories/"><i class="fa-fw fas fa-folder-open"></i> <span>文章分类</span></a></li><li><a class="site-page child" href="/charts/"><i class="fa-fw fa-solid fa-chart-pie"></i> <span>文章通览</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-user-group"></i> <span>友人</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/link/"><i class="fa-fw fas fa-link"></i> <span>友链展示</span></a></li><li><a class="site-page child" href="/addlink/"><i class="fa-fw fa fa-at"></i> <span>友链申请</span></a></li><li><a class="site-page child" href="/fcircle/"><i class="fa-fw fa-solid fa-circle-nodes"></i> <span>朋友动态</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-paper-plane"></i> <span>留言</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/comment/"><i class="fa-fw fa-solid fa-chalkboard"></i> <span>留言白板</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://mm.liushen.fun/"><i class="fa-fw fa-solid fa-pen-nib"></i> <span>提笔摘星</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa-solid fa-stethoscope"></i> <span>分享</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" target="_blank" rel="noopener" href="https://gist.liushen.fun/"><i class="fa-fw fa-solid fa-code"></i> <span>代码片段</span></a></li><li><a class="site-page child" href="/subscribe/"><i class="fa-fw fa-solid fa-rss"></i> <span>订阅本站</span></a></li><li><a class="site-page child" target="_blank" rel="noopener" href="https://pan.liushen.fun/"><i class="fa-fw fa-solid fa-laptop-file"></i> <span>清羽云盘</span></a></li></ul></div><div class="menus_item"><span class="site-page group hide"><i class="fa-fw fa fa-list"></i> <span>关于</span><i class="fas fa-chevron-down"></i></span><ul class="menus_item_child"><li><a class="site-page child" href="/about/"><i class="fa-fw fa fa-address-card"></i> <span>站长资料</span></a></li><li><a class="site-page child" href="/shuoshuo/"><i class="fa-fw fa fa-commenting"></i> <span>日常说说</span></a></li><li><a class="site-page child" href="/devices/"><i class="fa-fw fa-solid fa-tachograph-digital"></i> <span>我的设备</span></a></li></ul></div></div><center id="name-container"><a id="page-name" href="javascript:btf.scrollToDest(0, 500)">PAGE_NAME</a></center><div id="nav-right"><div id="travellings"><a class="site-page" href="https://www.travellings.cn/go.html" title="友链接力-随机开往" target="_blank" rel="noopener nofollow"><i class="fa-solid fa-bus fa-fw"></i></a></div><div id="ten-years"><a class="site-page" href="https://foreverblog.cn/go.html" title="友链接力-十年之约" target="_blank" rel="noopener nofollow"><i class="fa-brands fa-nfc-symbol fa-fw"></i></a></div><div id="random"><a class="site-page" href="javascript:randomPost()" title="随机前往一个文章"><i class="fa-solid fa-shuffle fa-fw"></i></a></div><div id="search-button"><span class="site-page social-icon search"><i class="fas fa-search fa-fw"></i></span></div><div id="toggle-menu"><span class="site-page" href="javascript:void(0);" title="展开菜单"><i class="fas fa-indent fa-fw"></i></span></div></div></nav><div id="post-info"><h1 class="post-title">Shynet：极为轻量化的访客监控系统</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2024-04-24T16:24:00.000Z" title="发表于 2024-04-25 00:24:00">2024-04-25</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-04-25T01:15:00.000Z" title="更新于 2024-04-25 09:15:00">2024-04-25</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/website/">博客管理</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">总字数:</span><span class="word-count">4.3k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">阅读时长:</span><span>14分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" data-flag-title=""><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">浏览量:</span><span id="busuanzi_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span><span class="post-meta-separator">|</span><span class="post-meta-commentcount"><i class="far fa-comments fa-fw post-meta-icon"></i><span class="post-meta-label">评论数:</span><a href="/posts/7cb13402/#post-comment"><span id="ArtalkCount"><i class="fa-solid fa-spinner fa-spin"></i></span></a></span></div></div></div><section class="main-hero-waves-area waves-area"><svg class="waves-svg" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s58 18 88 18 58-18 88-18 58 18 88 18v44h-352Z"></path></defs><g class="parallax"><use href="#gentle-wave" x="48" y="0"></use><use href="#gentle-wave" x="48" y="3"></use><use href="#gentle-wave" x="48" y="5"></use><use href="#gentle-wave" x="48" y="7"></use></g></svg></section></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><div class="ai-summary"><div class="ai-head"><div class="ai-head-left"><div class="ai-circle ai-circle-1"></div><div class="ai-circle ai-circle-2"></div><div class="ai-circle ai-circle-3"></div></div><div class="ai-head-right"><a class="ai-about-ai" href="/posts/40702a0d/">关于AI</a></div></div><div class="ai-explanation" style="display:block" data-summary="这里是清羽AI，这篇文章介绍了Shynet，一个极为轻量化的访客监控系统，旨在提供有用的网络分析信息同时尊重访问者隐私。Shynet的特点包括隐私保护、轻量级、开源自由、多用户多站点支持以及灵活部署。它追踪多种指标如页面访问量、访问会话数、页面加载时间、跳出率、停留时长、来源、地理位置与网络、操作系统与浏览器以及设备类型。文章还详细介绍了Shynet的使用与部署，包括Docker和Docker Compose的安装方法，以及配置模板文件。尽管Shynet在汉化和用户界面设计方面存在不足，但其轻量化和隐私保护特性使其成为个人项目和中小型网站的理想选择。">清羽AI正在绞尽脑汁想思路ING···</div><div class="ai-title"><div class="ai-title-left"><i class="fa-brands fa-slack"></i><div class="ai-title-text">清羽のAI摘要</div></div><div class="ai-tag" id="ai-tag">GLM-4-Flash</div></div></div><h2 id="碎碎念"><a href="#碎碎念" class="headerlink" title="碎碎念"></a>碎碎念</h2><p>我一直在找合适的访客统计系统，我曾推荐Umami，Umami的页面确实很美观简洁，我也非常喜欢他的风格，但是部署Umami需要部署两个容器，一个是PostgreSQL，一个是Umami本体，这两个占用都超过了200MB，我的服务器只有2GB，除去系统占用和已经部署的服务，剩下只有700MB了，为了服务器的稳定，我只能忍痛将其关闭，并使用揽星在评论区提到的统计系统：51La和统计鸟，但是这两个卧龙凤雏每天都加载不出来，严重影响访客统计数据，实在没办法，只能自行部署，于是我又开始在网上寻找更加轻量化的访客统计系统，最终找到了Shynet，总占用不到150MB，不过他也有些缺点，比如无法汉化，功能较少，但是这么小的占用，要什么自行车呢？最终决定使用这个并暂时维持，不过我还在寻找更好的替代品，如果有更合适的我将毫不犹豫地替换掉它。</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/23/6627d9c493885.png"></p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/24/662892dc37c76.png" alt="统计鸟和51La又又又加载不出来啦！！！"></p><h2 id="功能概要"><a href="#功能概要" class="headerlink" title="功能概要"></a>功能概要</h2><h3 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h3><p>Shynet 是一个网络分析工具，与大多数其他工具不同的是，它不需要将访问者信息交给第三方公司。Shynet 的设计目标是既提供有用的信息，又尊重访问者的隐私。</p><h3 id="特点"><a href="#特点" class="headerlink" title="特点"></a>特点</h3><ul><li><strong>隐私保护</strong>: Shynet完全自托管，不需向第三方公司提供访问者信息，由于其不使用 cookies 跟踪的特性，也避免了烦人的 cookie 提示。</li><li><strong>轻量级</strong>: 追踪脚本小巧，即使 JavaScript 不可用也能通过非脚本计算方式正常工作。</li><li><strong>开源自由</strong>: 使用 Django 构建，支持自定义，拓展度高（不过俺还不会呜呜呜）。</li><li><strong>多用户多站点支持</strong>: 一个 Shynet 实例可以支持多个用户，每个用户可以追踪多个不同的站点。</li><li><strong>灵活部署</strong>: 可以在单个小型 VPS 上以 Docker 容器方式运行，也可在大型 Kubernetes 集群上部署以应对更高的流量。</li></ul><h3 id="追踪指标"><a href="#追踪指标" class="headerlink" title="追踪指标"></a>追踪指标</h3><ul><li><strong>页面访问量</strong>: 统计网站页面的打开/浏览次数。</li><li><strong>访问会话数</strong>: 统计网站被访问的次数。</li><li><strong>页面加载时间</strong>: 记录页面加载所需的时间。</li><li><strong>跳出率</strong>: 表示只访问了一个页面就离开的访问者的比例。</li><li><strong>停留时长</strong>: 记录访问者在网站停留的时长。</li><li><strong>来源</strong>: 统计访问者从哪些链接跳转而来。</li><li><strong>地理位置与网络</strong>: 根据 IP 地址推测访问者的地理位置与网络信息。</li><li><strong>操作系统与浏览器</strong>: 统计访问者使用的操作系统和浏览器信息。</li><li><strong>设备类型</strong>: 区分访问者使用的设备类型，如台式机、平板或手机。</li></ul><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/24/6627ddfeec357.png" alt="页面展示"></p><h3 id="使用与部署"><a href="#使用与部署" class="headerlink" title="使用与部署"></a>使用与部署</h3><ul><li>提供详细的使用指南，支持 Docker、docker-compose、Heroku 或 Kubernetes 部署。</li><li>支持灵活的账户管理，可以方便地分享服务和协作。</li></ul><h3 id="限制与建议"><a href="#限制与建议" class="headerlink" title="限制与建议"></a>限制与建议</h3><ul><li>适用于个人项目和中小型网站，对于超高流量的网站未经过充分测试。</li><li>需要一定的技术知识来部署和维护，不适合需要一键式解决方案的用户。</li></ul><p>以上就是在github官方介绍中对于shynet的简要概括，我使用中文阐述了一遍，具体内容可以查看官方英文文档：</p><div class="liushen-tag-link"><a class="tag-Link" target="_blank" href="/safego/?u=aHR0cHM6Ly9naXRodWIuY29tL21pbGVzbWNjL3NoeW5ldA" rel="external nofollow noopener noreferrer"><div class="tag-link-tips">🙄引用站外地址，不保证站点的可用性和安全性</div><div class="tag-link-bottom"><div class="tag-link-left" style="background-image:url(https://p.liiiu.cn/i/2024/07/27/66a461a3098aa.webp)"></div><div class="tag-link-right"><div class="tag-link-title">Shynet：Modern，privacy-friendly，and cookie-free web analytics</div><div class="tag-link-sitename">github.com</div></div><i class="fa-solid fa-angle-right"></i></div></a></div><h2 id="安装教程"><a href="#安装教程" class="headerlink" title="安装教程"></a>安装教程</h2><p>本次教程主要介绍第二种：docker-compose安装，因为docker方案需要设置<code>--network='host'</code>，修改端口号可能不太方便(其实是我不会QwQ)，而我的默认8080是被占用的状态，所以我选择docker-compose安装，这里也会着重讲解该方法，但是由于原文档是英文，所以我也会顺带着尽量详细的使用中文介绍一下第一种docker的安装方案，供大家参考。</p><h3 id="配置模板文件"><a href="#配置模板文件" class="headerlink" title="配置模板文件"></a>配置模板文件</h3><p>模板文件如下：</p><figure class="highlight yaml"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 数据库设置（PostgreSQL）</span></span><br><span class="line"><span class="string">DB_NAME=shynet_db</span>  <span class="comment"># 数据库名称</span></span><br><span class="line"><span class="string">DB_USER=shynet_db_user</span>  <span class="comment"># 数据库用户名</span></span><br><span class="line"><span class="string">DB_PASSWORD=shynet_db_user_password</span>  <span class="comment"># 数据库密码</span></span><br><span class="line"><span class="string">DB_HOST=db</span>  <span class="comment"># 数据库主机地址</span></span><br><span class="line"><span class="string">DB_PORT=5432</span>  <span class="comment"># 数据库端口</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 数据库设置（SQLite）- 注释掉 PostgreSQL 设置</span></span><br><span class="line"><span class="comment"># SQLITE=True</span></span><br><span class="line"><span class="comment"># DB_NAME=/var/local/shynet/db/db.sqlite3</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 邮件设置（可选）</span></span><br><span class="line"><span class="string">EMAIL_HOST_USER=example</span>  <span class="comment"># 邮件主机用户名</span></span><br><span class="line"><span class="string">EMAIL_HOST_PASSWORD=example_password</span>  <span class="comment"># 邮件主机密码</span></span><br><span class="line"><span class="string">EMAIL_HOST=smtp.example.com</span>  <span class="comment"># 邮件主机地址</span></span><br><span class="line"><span class="string">EMAIL_PORT=465</span>  <span class="comment"># 邮件端口</span></span><br><span class="line"><span class="string">EMAIL_USE_SSL=True</span>  <span class="comment"># 使用 SSL 加密连接</span></span><br><span class="line"><span class="comment"># 如果你的 SMTP 服务器使用 TLS，请注释掉 EMAIL_USE_SSL 并取消注释 EMAIL_USE_TLS。</span></span><br><span class="line"><span class="comment"># EMAIL_USE_TLS=True</span></span><br><span class="line"><span class="string">SERVER_EMAIL=Shynet</span> <span class="string">&lt;noreply@shynet.example.com&gt;</span>  <span class="comment"># 服务器邮箱</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 一般的 Django 设置 - 用于生成密钥，运行：python3 -c "import secrets; print(secrets.token_urlsafe())"</span></span><br><span class="line"><span class="string">DJANGO_SECRET_KEY=random_string</span>  <span class="comment"># Django 密钥</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 将这些设置为你的部署域名。两者都用逗号分隔，但 CSRF_TRUSTED_ORIGINS 还需要一个方案（例如，`https://`）。</span></span><br><span class="line"><span class="string">ALLOWED_HOSTS=example.com</span>  <span class="comment"># 允许访问的域名</span></span><br><span class="line"><span class="string">CSRF_TRUSTED_ORIGINS=https://example.com</span>  <span class="comment"># 允许跨站请求伪造的域名</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 本地化</span></span><br><span class="line"><span class="comment"># https://docs.djangoproject.com/en/2.2/topics/i18n/</span></span><br><span class="line"><span class="string">LANGUAGE_CODE=en-us</span>  <span class="comment"># 语言设置为英文（美国）</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 如果你想让人们能够注册你的 Shynet 实例，请将此设置为 True（不建议）</span></span><br><span class="line"><span class="string">ACCOUNT_SIGNUPS_ENABLED=False</span>  <span class="comment"># 是否允许用户注册账号</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 用户邮箱地址是否需要验证？只有在你设置了邮件设置并允许公开注册时才将其设置为 `required`；否则，这是不必要的。</span></span><br><span class="line"><span class="string">ACCOUNT_EMAIL_VERIFICATION=none</span>  <span class="comment"># 账号邮箱验证设置</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 管理面板的时区。影响日期的显示。</span></span><br><span class="line"><span class="comment"># 这必须与 IANA 的 tz 数据库中的值匹配。</span></span><br><span class="line"><span class="comment"># 维基百科有一个有效字符串列表：https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</span></span><br><span class="line"><span class="string">TIME_ZONE=America/New_York</span>  <span class="comment"># 时区设置为美国东部时间</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置为 "False" 如果你不打算通过 HTTPS 提供内容</span></span><br><span class="line"><span class="string">SCRIPT_USE_HTTPS=True</span>  <span class="comment"># 是否使用 HTTPS</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 监控脚本“报到”的频率是多少（以毫秒为单位）？</span></span><br><span class="line"><span class="string">SCRIPT_HEARTBEAT_FREQUENCY=5000</span>  <span class="comment"># 监控脚本心跳频率</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 同一个用户的请求之间可以经过多长时间，然后创建一个新的会话，单位为秒？</span></span><br><span class="line"><span class="string">SESSION_MEMORY_TIMEOUT=1800</span>  <span class="comment"># 会话内存超时时间</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否只有超级用户（管理员）能够创建服务？当你想邀请其他人加入你的 Shynet 实例但又不希望他们能够创建自己的服务时，这很有用。</span></span><br><span class="line"><span class="string">ONLY_SUPERUSERS_CREATE=True</span>  <span class="comment"># 是否只有超级用户能创建服务</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否在启动时执行检查和设置，包括应用未应用的迁移。对于大多数设置，建议值为 True。默认为 True。</span></span><br><span class="line"><span class="comment"># 如果值为 False，则会跳过。将会执行检查和设置。</span></span><br><span class="line"><span class="string">PERFORM_CHECKS_AND_SETUP=True</span>  <span class="comment"># 是否在启动时执行检查和设置</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Shynet 应绑定的端口。如果你在 Heroku 上部署，请不要设置此项。</span></span><br><span class="line"><span class="string">PORT=8080</span>  <span class="comment"># Shynet 监听端口</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 如果你不希望在前端显示版本号，请将其设置为 "False"。</span></span><br><span class="line"><span class="string">SHOW_SHYNET_VERSION=True</span>  <span class="comment"># 是否在前端显示 Shynet 版本号</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Redis、队列和并行设置；对于单实例部署不必要。</span></span><br><span class="line"><span class="comment"># 不要取消注释这些，除非你知道你在做什么！</span></span><br><span class="line"><span class="comment"># NUM_WORKERS=1</span></span><br><span class="line"><span class="comment"># 如果你有多个前端工作节点/实例，请确保设置 REDIS_CACHE_LOCATION。</span></span><br><span class="line"><span class="comment"># REDIS_CACHE_LOCATION=redis://redis.default.svc.cluster.local/0</span></span><br><span class="line"><span class="comment"># 如果设置了 CELERY_BROKER_URL，请确保 CELERY_TASK_ALWAYS_EAGER 为 False，并</span></span><br><span class="line"><span class="comment"># 通过 `celeryworker.sh` 在某个地方运行一个独立的队列消费者。</span></span><br><span class="line"><span class="comment"># CELERY_TASK_ALWAYS_EAGER=False</span></span><br><span class="line"><span class="comment"># CELERY_BROKER_URL=redis://redis.default.svc.cluster.local/1</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Shynet 是否在仪表板中显示第三方图标？</span></span><br><span class="line"><span class="string">SHOW_THIRD_PARTY_ICONS=True</span>  <span class="comment"># 是否在仪表板中显示第三方图标</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否全局阻止 IP 地址的收集？</span></span><br><span class="line"><span class="string">BLOCK_ALL_IPS=False</span>  <span class="comment"># 是否全局阻止 IP 地址的收集</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否在哈希用户时包含日期和站点 ID？</span></span><br><span class="line"><span class="comment"># 这将阻止任何跨站跟踪的可能性，前提是还禁用了 IP 收集，且外部键（主键）未提供。它还将阻止会话跨越一天到另一天。</span></span><br><span class="line"><span class="string">AGGRESSIVE_HASH_SALTING=True</span>  <span class="comment"># 是否包含日期和站点 ID 在哈希用户时</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 在前端中链接到的自定义位置 URL。</span></span><br><span class="line"><span class="comment"># $LATITUDE 将被纬度替换，$LONGITUDE 将被经度替换。</span></span><br><span class="line"><span class="comment"># 示例：</span></span><br><span class="line"><span class="comment">#  - https://www.openstreetmap.org/?mlat=$LATITUDE&amp;mlon=$LONGITUDE （默认）</span></span><br><span class="line"><span class="comment">#  - https://www.google.com/maps/search/?api=1&amp;query=$LATITUDE,$LONGITUDE</span></span><br><span class="line"><span class="comment">#  - https://www.mapquest.com/near-$LATITUDE,$LONGITUDE</span></span><br><span class="line"><span class="string">LOCATION_URL=https://www.openstreetmap.org/?mlat=$$LATITUDE&amp;mlon=$$LONGITUDE</span>  <span class="comment"># 自定义位置 URL</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 仪表板页面上应显示多少个服务？</span></span><br><span class="line"><span class="comment"># 如果你根本不想进行分页，请设置为一个很大的数字。</span></span><br><span class="line"><span class="string">DASHBOARD_PAGE_SIZE=5</span>  <span class="comment"># 仪表板页面显示服务数量</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否将背景条缩放到全宽度？</span></span><br><span class="line"><span class="string">USE_RELATIVE_MAX_IN_BAR_VISUALIZATION=True</span>  <span class="comment"># 背景条是否缩放到全宽度</span></span><br></pre></td></tr></tbody></table></figure><p>以上是所有可选项的模板内容，这也忒长了！不过我们可以简化呀，我们只需要关键配置即可，其余的按照默认即可使用：</p><figure class="highlight yaml"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># PostgreSQL 数据库连接信息</span></span><br><span class="line"><span class="string">DB_NAME=shynetdb</span></span><br><span class="line"><span class="string">DB_USER=shynet</span></span><br><span class="line"><span class="string">DB_PASSWORD=your-password</span></span><br><span class="line"><span class="string">DB_HOST=127.0.0.1</span></span><br><span class="line"><span class="string">DB_PORT=5432</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 如果不需要邮件功能的话可以直接注释掉</span></span><br><span class="line"><span class="string">EMAIL_HOST_USER=nide@you.xiang</span></span><br><span class="line"><span class="string">EMAIL_HOST_PASSWORD=bidabidoudoubidabibidou</span></span><br><span class="line"><span class="string">EMAIL_HOST=smtp.exmail.qq.com</span></span><br><span class="line"><span class="string">EMAIL_PORT=465</span></span><br><span class="line"><span class="string">EMAIL_USE_SSL=True</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 默认为 *，建议修改为你准备部署的域名</span></span><br><span class="line"><span class="string">ALLOWED_HOSTS=um.liushen.fun</span></span><br><span class="line"><span class="string">CSRF_TRUSTED_ORIGINS=https://um.liushen.fun</span> <span class="comment"># 这里一定要改！一定要改！</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 时区设置，可以修改为 Asia/Shanghai</span></span><br><span class="line"><span class="string">TIME_ZONE=Asia/Shanghai</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Localization</span></span><br><span class="line"><span class="comment"># https://docs.djangoproject.com/en/2.2/topics/i18n/</span></span><br><span class="line"><span class="string">LANGUAGE_CODE=en-us</span> <span class="comment"># 有中文，但是建议不要中文，因为效果很差</span></span><br></pre></td></tr></tbody></table></figure><p>如上所示，我们最需要的内容就是数据库，CSRF验证域名，时区设置，其他的都可以注释的，其中数据库我们稍后会讲到，CSRF验证域名一定要设置！否则会出现部署后无法使用的尴尬局面，如下：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/24/662897569d4bf.png" alt="烦，可搞了我半天时间！"></p><h3 id="安装PostgreSQL"><a href="#安装PostgreSQL" class="headerlink" title="安装PostgreSQL"></a>安装PostgreSQL</h3><ol><li><p>打开终端，输入<code>apt install postgresql</code>，下载postgreSQL数据库。</p></li><li><p>如果一切顺利的话，下面就可以进行连接数据库了，输入<code>su - postgres -c psql</code>.</p></li><li><p>连接成功后先修改密码，输入<code>ALTER USER postgres WITH PASSWORD 'your-password';</code>，这样密码就修改成功了。</p></li><li><p>下面创建数据库和用户，输入以下内容：</p><figure class="highlight powershell"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">CREATE USER shynet WITH PASSWORD <span class="string">'your-password'</span>;</span><br><span class="line">CREATE DATABASE shynetdb OWNER shynet;</span><br><span class="line">GRANT ALL PRIVILEGES ON DATABASE shynetdb to shynet;</span><br></pre></td></tr></tbody></table></figure></li></ol><p>这样我们的数据库就创建好了，下面我们开始安装程序。</p><h3 id="使用-Docker-安装"><a href="#使用-Docker-安装" class="headerlink" title="使用 Docker 安装"></a>使用 Docker 安装</h3><ol><li><p><strong>拉取最新版本的 Shynet</strong>:首先 运行 <code>docker pull milesmcc/shynet:latest</code> 命令拉取最新的镜像，如果没有安装 Docker，请先安装 Docker。</p></li><li><p><strong>选择数据库</strong>:</p><p>Shynet数据库支持两种数据库，为了稳定我选择了PostgreSQL数据库，我也建议大家使用PostgreSQL数据库。</p><ul><li><p>如果使用 PostgreSQL，需要准备一个 PostgreSQL 服务器，并设置好相关环境变量，比如用户名、密码、主机和端口等，当然端口默认都是5432。</p></li><li><p>如果准备使用 SQLite，需创建一个 Docker volume 用于持久化数据库，并在运行容器时将该 volume 挂载到容器内（没看懂部分，这里附上原文）。</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/24/6627e07d4c648.png" alt="SQLite部署过程"></p></li></ul></li><li><p><strong>配置环境文件</strong>: 使用提供的模板文件 <code>.env</code>，设置数据库信息等必要配置。</p></li><li><p><strong>首次启动 Shynet 服务器</strong>: 运行 <code>docker run --env-file=&lt;你的环境文件&gt; milesmcc/shynet:latest</code> 命令。如果一切正常，你会看到关于未设置管理员用户或主机的几条警告，这是正常现象。</p></li><li><p><strong>创建管理员用户</strong>: 运行 <code>docker run --env-file=&lt;你的环境文件&gt; milesmcc/shynet:latest ./manage.py registeradmin &lt;你的邮箱&gt;</code> 命令，临时密码将会打印到控制台上。</p></li><li><p><strong>设置 Shynet 实例的标识</strong>: 运行 <code>docker run --env-file=&lt;你的环境文件&gt; milesmcc/shynet:latest ./manage.py whitelabel &lt;标识&gt;</code> 命令，这个标识可以随意设置，用于重命名 Shynet 实例。</p></li><li><p><strong>启动 Web 服务器</strong>: 运行 <code>docker run --env-file=&lt;你的环境文件&gt; milesmcc/shynet:latest</code> 命令。可能需要将 Docker 的端口 8080（Shynet 运行的端口）绑定到本地的端口 80（http），使用 <code>-p 80:8080</code> 参数。访问服务主页，使用步骤 5 中的凭据登录。</p></li><li><p><strong>创建服务</strong>: 点击右上角的“+ 创建服务”，填写相关信息并点击“创建”，即可跳转到新服务的分析页面。</p></li><li><p><strong>获取跟踪脚本代码</strong>: 在服务页面的右上角点击“管理”，即可获取跟踪脚本代码。将此代码插入到需要跟踪的页面上。</p></li></ol><h3 id="使用-Docker-Compose-安装"><a href="#使用-Docker-Compose-安装" class="headerlink" title="使用 Docker Compose 安装"></a>使用 Docker Compose 安装</h3><ol><li><strong>确保安装了 docker-compose</strong>: 如果没有安装，请先安装 docker-compose。</li><li><strong>克隆仓库</strong>: 克隆 Shynet 仓库到本地。</li><li><strong>配置环境文件</strong>: 使用模板文件 <code>.env</code>，如上正常设置即可。</li><li><strong>修改 nginx 配置</strong>: 在仓库根目录下的 <code>nginx.conf</code> 文件中，将 <code>example.com</code> 替换为你的主机名。然后在 <code>docker-compose.yml</code> 文件中的第38行，将端口号修改为你希望绑定的本地端口号。</li><li><strong>首次启动 Shynet 服务器</strong>: 运行 <code>docker-compose up -d</code> 命令。如果出现 “permission denied” 或 “Couldn’t connect to Docker daemon” 错误，可以使用 sudo 前缀或将用户添加到 docker 组，不过一般不会出现，正常安装即可。</li><li>这样我们的主程序就创建成功了，下面进行登陆操作。</li><li><strong>创建管理员用户</strong>: 运行 <code>docker exec -it shynet_main ./manage.py registeradmin &lt;你的邮箱&gt;</code> 命令，临时密码将会打印到控制台上，注意复制。</li></ol><ul><li>下面是可选项，不进行也可以正常使用：</li></ul><ol><li><strong>设置 Shynet 实例的标识</strong>: 运行 <code>docker exec -it shynet_main ./manage.py whitelabel &lt;标识&gt;</code> 命令，此标识用于重命名 Shynet 实例。</li></ol><h2 id="基本体验"><a href="#基本体验" class="headerlink" title="基本体验"></a>基本体验</h2><h3 id="功能方面"><a href="#功能方面" class="headerlink" title="功能方面"></a>功能方面</h3><ol><li><p><strong>语言支持</strong>：虽然官方介绍支持设置语言，但是经过实测，如果设置为汉语会出现很难受的部分汉化，如下：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/24/66292b48e483b.png" alt="部分汉化展示"></p><p>其中的左边注销汉化了，上方的月份汉化了，除此之外都没有汉化成功，如果你点开某个设置后会更加不堪入目，所以强烈不建议汉化，如果非要尝试，可以设置语言为<code>zh-hans</code>。</p></li><li><p>总体来说，我不是很喜欢，但是奈何他轻量化，我又能要什么自行车呢？更何况页面也不算太难看，只是一些逻辑方面显得比较简陋，首先就是他的仪表盘：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/24/66292be9c30be.png" alt="仪表盘展示"></p><p>可以展示多个站点的数据，看起来也很简洁，但是左边菜单栏看起来就很简陋了，可以看到，账户是分类，却和下面的按钮混在一起。</p></li><li><p>点开一个页面之后，该有的数据都有了，如访客统计：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/25/66292cdf7adf8.png" alt="访客统计"></p><p>访客地图，访客来源：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/25/66292d6bcb387.png" alt="访客地图等功能"></p></li><li><p>除此之外，refer统计，操作系统，设备等功能也是很齐全的，。足够我日常进行统计了，这里就不一一展示了。</p></li></ol><h3 id="优点"><a href="#优点" class="headerlink" title="优点"></a>优点</h3><p>作为一个轻量化的系统，他的优点自然就是极为轻量化了，它的统计代码如下：</p><figure class="highlight html"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">noscript</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">"https://um.liushen.fun/ingress/aaaaaa-bbbbbb-cccccc-dddddd/pixel.gif"</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">noscript</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">defer</span> <span class="attr">src</span>=<span class="string">"https://um.liushen.fun/ingress/aaaaaa-bbbbbb-cccccc-dddddd/script.js"</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></tbody></table></figure><p>可以看到它支持两种统计方式，有脚本和无脚本，其中脚本大小为1.8KB，无脚本统计甚至只需要43字节</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/25/66292f24b9aec.png" alt="统计文件大小展示"></p><p>并且由于其无需cookie的特性，它不会被各种拦截器所拦截，这也解决了统计鸟和51la的痛点，并且其内存占用也非常之小，强烈建议想要自行部署访客统计系统且内存不够的用户：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/25/66292fe130b66.png" alt="极为轻量化"></p><h3 id="缺点"><a href="#缺点" class="headerlink" title="缺点"></a>缺点</h3><p>首先这个大小放在这里，就可以让我忽略几乎所有的缺点，但是仍然有一点，那就是该系统的时间粒度默认为一个月，需要手动调整才能显示为最近七天或者当天数据：</p><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/25/66292fda2e430.png" alt="时间粒度过长"></p><p>并且无法修改默认显示时间粒度，除此之外，我可以包容它的一切缺点，不过我仍然在寻找更好的替代品，如果在我服务器的承受范围内，我将毫不犹豫替换掉他，因为我是一个外观主义者。</p><h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>在我寻找合适的访客统计系统的过程中，我经历了很多的尝试。从推荐的Umami到后来的51La和统计鸟，再到本次选择的Shynet，每一步都是为了找到一个符合服务器要求、易于部署、功能齐全的解决方案，Shynet作为一个自托管的网络分析工具，不仅保护了访客的隐私，而且在轻量化和功能性方面表现出色。尽管在汉化和用户界面设计方面有些不足，但其在技术层面的优势使其成为了一个可行的选择。如果你也在寻求一个及其轻量化的访客统计系统，不妨可以试试，相信不会让你失望！</p><p>本次教程到此结束，如果有什么问题欢迎在评论区留言！</p><h2 id="参考教程"><a href="#参考教程" class="headerlink" title="参考教程"></a>参考教程</h2><div class="liushen-tag-link"><a class="tag-Link" target="_blank" href="/safego/?u=aHR0cHM6Ly9naXRodWIuY29tL21pbGVzbWNjL3NoeW5ldA" rel="external nofollow noopener noreferrer"><div class="tag-link-tips">🙄引用站外地址，不保证站点的可用性和安全性</div><div class="tag-link-bottom"><div class="tag-link-left" style="background-image:url(https://p.liiiu.cn/i/2024/07/27/66a461a3098aa.webp)"></div><div class="tag-link-right"><div class="tag-link-title">Shynet：Modern，privacy-friendly，and cookie-free web analytics</div><div class="tag-link-sitename">github.com</div></div><i class="fa-solid fa-angle-right"></i></div></a></div><div class="liushen-tag-link"><a class="tag-Link" target="_blank" href="/safego/?u=aHR0cHM6Ly9hdHB4LmNvbS9ibG9nL2J1aWxkLXNoeW5ldC13ZWItYW5hbHl0aWNzLw" rel="external nofollow noopener noreferrer"><div class="tag-link-tips">🙄引用站外地址，不保证站点的可用性和安全性</div><div class="tag-link-bottom"><div class="tag-link-left" style="background-image:url(https://p.liiiu.cn/i/2024/07/27/66a4632bbf06e.webp)"></div><div class="tag-link-right"><div class="tag-link-title">搭建Shynet网站流量统计分析工具</div><div class="tag-link-sitename">atpX</div></div><i class="fa-solid fa-angle-right"></i></div></a></div><h2 id="每日一图"><a href="#每日一图" class="headerlink" title="每日一图"></a>每日一图</h2><p><img src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/25/66293214d6ed8.png" alt="超级喜欢的《完美世界》国漫小姐姐！"></p><p><em>— 柳影曳曳，清酒孤灯，扬笔撒墨，心境如霜</em></p></article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>Shynet：极为轻量化的访客监控系统</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://blog.liushen.fun/posts/7cb13402/">https://blog.liushen.fun/posts/7cb13402/</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info" style="position:relative;z-index:3"><div class="post-copyright-a" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>作者</h><div class="post-copyright-cc-info"><h>LiuShen</h></div></div><div class="post-copyright-c" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>发布于</h><div class="post-copyright-cc-info"><h>2024-04-25</h></div></div><div class="post-copyright-u" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>更新于</h><div class="post-copyright-cc-info"><h>2024-04-25</h></div></div><div class="post-copyright-c" style="display:inline-block;width:fit-content;margin:20px 20px 20px 0"><h>许可协议</h><div class="post-copyright-cc-info"><a rel="noopener" target="_blank" title=" CC BY 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/?ref=chooser-v1">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E7%BD%91%E7%AB%99%E7%9B%91%E6%8E%A7/">网站监控</a><a class="post-meta__tags" href="/tags/Shynet/">Shynet</a></div><div class="post-share"><div class="social-share" data-image="https://p.liiiu.cn/i/2024/04/23/6627d3c9c9d7c.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/butterfly-extsrc@1.1.4/sharejs/dist/css/share.min.css" media="print" onload='this.media="all"'><script src="https://jsd.liiiu.cn/npm/butterfly-extsrc@1.1.4/sharejs/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i>来😍鼠标过来一点~</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/config/img/wechat.png" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="/config/img/wechat.png" alt="微信"></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="/config/img/wechat.png" target="_blank"><img class="post-qr-code-img" src="" data-lazy-src="/config/img/wechat.png" alt="支付宝"></a><div class="post-qr-code-desc">支付宝</div></li></ul></div></div><nav class="pagination-post" id="pagination"><a class="prev-post pull-left" href="/posts/9efc1657/" title="安全跳转页面·重制版"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/20/6623e50e7b7d2.png" onerror='onerror=null,src="/img/404.jpg"' alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">安全跳转页面·重制版</div></div></a><a class="next-post pull-right" href="/posts/e401be2d/" title="自部署busuanzi访问量统计服务"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/30/662fc64623795.png" onerror='onerror=null,src="/img/404.jpg"' alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">自部署busuanzi访问量统计服务</div></div></a></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span>相关推荐</span></div><div class="relatedPosts-list"><a href="/posts/9be5be35/" title="给自己的网站添加一个访客统计系统"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/03/30/6608357765559.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-03-31</div><div class="title">给自己的网站添加一个访客统计系统</div></div></a><a href="/posts/e401be2d/" title="自部署busuanzi访问量统计服务"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/30/662fc64623795.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-04-30</div><div class="title">自部署busuanzi访问量统计服务</div></div></a><a href="/posts/198e4e52/" title="恢复busuanzi访客数据的可行方法"><img class="cover" src="" data-lazy-src="https://p.liiiu.cn/i/2024/04/04/660d84d25efb0.png" alt="cover"><div class="content is-center"><div class="date"><i class="far fa-calendar-alt fa-fw"></i> 2024-04-04</div><div class="title">恢复busuanzi访客数据的可行方法</div></div></a></div></div><hr class="custom-hr"><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i> <span>评论</span></div></div><div class="comment-wrap"><div><div id="artalk-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info is-center"><div class="author-info-detail"><p class="author-info-hello">👋 欢迎光临！</p><p class="author-info-desc">你们好呀！我是站长LiuShen！一个快乐，积极，热爱生活的孩纸！😜😜😜</p></div><div class="avatar-img"><img class="mood-icon" src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/14/67d301461a24a.webp" alt="🤤" onerror='this.onerror=null,this.src="/img/friend_404.gif"'><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/03/13/67d2fc82d329c.webp" onerror='this.onerror=null,this.src="/img/friend_404.gif"' alt="avatar"></div><div class="author-info-name">LiuShen</div><div class="site-data"><a href="/archives/"><div class="headline">文章</div><div class="length-num">72</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">98</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">3</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/willow-god"><i class="fab fa-github"></i><span>Follow Me 🛫</span></a><div class="card-info-social-icons"><a class="social-icon" href="mailto:01@liushen.fun" target="_blank" title="Email"><i class="fa-solid fa-envelope"></i></a><a class="social-icon" href="http://wpa.qq.com/msgrd?v=3&amp;uin=3162475700&amp;site=qq&amp;menu=yes" target="_blank" title="QQ：3162475700"><i class="fa-brands fa-qq"></i></a><a class="social-icon" href="https://wakatime.com/@LiuShen" target="_blank" title="Wakatime"><i class="fa-solid fa-chart-column"></i></a><a class="social-icon" href="https://blog.liushen.fun/atom.xml" target="_blank" title="rss地址"><i class="fa-solid fa-rss"></i></a></div></div><div class="card-widget" id="card-poem"><div id="poem_sentence"></div><div id="poem_info"><div id="poem_dynasty"></div><div id="poem_author"></div></div></div><script src="/js/jinrishici.js" charset="utf-8"></script><script>jinrishici.load((function(e){var n=document.querySelector("#poem_sentence"),t=document.querySelector("#poem_author"),o=document.querySelector("#poem_dynasty"),r=e.data.content;r=r.substr(0,r.length-1),n.innerHTML=r,o.innerHTML=e.data.origin.dynasty,t.innerHTML=e.data.origin.author+"《"+e.data.origin.title+"》"}))</script><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content"><p><strong>博客架构概览：</strong><br>⚙️框架核心：Hexo<br>🕹️界面设计：Butterfly<br>🔮安全保障：长亭雷池<br>🔩管理工具：宝塔面板，1Panel<br>🎰服务器支持：阿里云，腾讯云<br>🎲CDN加速：多吉云，CloudFlare<br><strong>快捷跳转地址：</strong><br>🧩个人相册：<a target="_blank" rel="noopener" href="https://xc.liushen.fun">xc.liushen.fun</a><br>🤖个人导航：<a target="_blank" rel="noopener" href="https://www.liushen.fun">www.liushen.fun</a><br></p><img src="" data-lazy-src="/config/img/notice.gif" alt="可爱捏" title="可爱捏" style="width:100%;border-radius:10px"></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%A2%8E%E7%A2%8E%E5%BF%B5"><span class="toc-text">碎碎念</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8A%9F%E8%83%BD%E6%A6%82%E8%A6%81"><span class="toc-text">功能概要</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BB%8B%E7%BB%8D"><span class="toc-text">介绍</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%89%B9%E7%82%B9"><span class="toc-text">特点</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%BF%BD%E8%B8%AA%E6%8C%87%E6%A0%87"><span class="toc-text">追踪指标</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8%E4%B8%8E%E9%83%A8%E7%BD%B2"><span class="toc-text">使用与部署</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%99%90%E5%88%B6%E4%B8%8E%E5%BB%BA%E8%AE%AE"><span class="toc-text">限制与建议</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B"><span class="toc-text">安装教程</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%85%8D%E7%BD%AE%E6%A8%A1%E6%9D%BF%E6%96%87%E4%BB%B6"><span class="toc-text">配置模板文件</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E8%A3%85PostgreSQL"><span class="toc-text">安装PostgreSQL</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8-Docker-%E5%AE%89%E8%A3%85"><span class="toc-text">使用 Docker 安装</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%BF%E7%94%A8-Docker-Compose-%E5%AE%89%E8%A3%85"><span class="toc-text">使用 Docker Compose 安装</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%9F%BA%E6%9C%AC%E4%BD%93%E9%AA%8C"><span class="toc-text">基本体验</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8A%9F%E8%83%BD%E6%96%B9%E9%9D%A2"><span class="toc-text">功能方面</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BC%98%E7%82%B9"><span class="toc-text">优点</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BC%BA%E7%82%B9"><span class="toc-text">缺点</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-text">总结</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%8F%82%E8%80%83%E6%95%99%E7%A8%8B"><span class="toc-text">参考教程</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%AF%8F%E6%97%A5%E4%B8%80%E5%9B%BE"><span class="toc-text">每日一图</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/7915ee6b/" title="数据库可视化WEB工具对比"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/05/25/6832cc105bc41.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="数据库可视化WEB工具对比"></a><div class="content"><a class="title" href="/posts/7915ee6b/" title="数据库可视化WEB工具对比">数据库可视化WEB工具对比</a><time datetime="2025-05-25T10:01:21.000Z" title="更新于 2025-05-25 18:01:21">2025-05-25</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/40702a0d/" title="本地实现HEXO文章AI摘要"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/05/06/6819cd4532457.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="本地实现HEXO文章AI摘要"></a><div class="content"><a class="title" href="/posts/40702a0d/" title="本地实现HEXO文章AI摘要">本地实现HEXO文章AI摘要</a><time datetime="2025-05-06T16:01:21.000Z" title="更新于 2025-05-07 00:01:21">2025-05-07</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/5f71a4b1/" title="耗子面板和DPanel简单体验"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/04/27/680dc7916ef34.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="耗子面板和DPanel简单体验"></a><div class="content"><a class="title" href="/posts/5f71a4b1/" title="耗子面板和DPanel简单体验">耗子面板和DPanel简单体验</a><time datetime="2025-04-28T14:48:21.000Z" title="更新于 2025-04-28 22:48:21">2025-04-28</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/caee2d9f/" title="美化你的RSS订阅地址"><img src="" data-lazy-src="https://p.liiiu.cn/i/2025/04/18/68024a618942b.webp" onerror='this.onerror=null,this.src="/img/404.jpg"' alt="美化你的RSS订阅地址"></a><div class="content"><a class="title" href="/posts/caee2d9f/" title="美化你的RSS订阅地址">美化你的RSS订阅地址</a><time datetime="2025-04-18T12:48:21.000Z" title="更新于 2025-04-18 20:48:21">2025-04-18</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap" style="background:0 0"><div id="footer_icons"><div><a class="icon_link" rel="noopener external nofollow" href="https://www.liushen.fun/" title="导航站点" target="_blank"><i class="fa-solid fa-compass"></i></a><a class="icon_link" rel="noopener external nofollow" href="https://admin.qidian.qq.com/static_proxy/b2b-qq/wpa-link/index.html#/person?uin=3162475700" title="联系QQ" target="_blank"><i class="fa-brands fa-qq"></i></a><a class="icon_link" rel="noopener external nofollow" href="https://github.com/willow-god" title="我的github主页" target="_blank"><i class="fa-brands fa-github"></i></a><a class="icon_link" rel="noopener external nofollow" href="mailto:01@liushen.fun" title="发送邮件至博主邮箱" target="_blank"><i class="fa-solid fa-envelope"></i></a></div><div class="footer_logo_container" onclick="btf.scrollToDest(0,500)" title="返回顶部"><img class="footer_logo" src="" data-lazy-src="/img/footer.gif"></div><div><a class="icon_link" rel="noopener external nofollow" href="https://wakatime.com/@LiuShen" title="Wikitime" target="_blank"><i class="fa-solid fa-clock"></i></a><a class="icon_link" rel="noopener external nofollow" href="https://gitlab.com/" title="gitlab" target="_blank"><i class="fa-brands fa-gitlab"></i></a><a class="icon_link" href="/shuoshuo/" title="日常说说" data-pjax-state="data-pjax-state"><i class="fa-solid fa-file-pen"></i></a><a class="icon_link" href="/comment/" title="留言板" data-pjax-state="data-pjax-state"><i class="fa-solid fa-comment"></i></a></div></div><div id="footer_content"><div class="footer-group"><h3 class="footer-title">关于本站</h3><div class="footer-links"><a class="footer-item" target="_blank" href="https://www.liushen.fun/">导航站点</a><a class="footer-item" href="/shuoshuo/">日常说说</a><a class="footer-item" target="_blank" href="https://um.liushen.fun/share/bIEnQp0xnMxD8c9V/blog.liushen.fun">访客信息</a><a class="footer-item" target="_blank" href="https://mm.liushen.fun/">提笔摘星</a><a class="footer-item" target="_blank" href="https://status.liushen.fun/">在线状态</a><a class="footer-item" href="/subscribe/">订阅本站</a></div></div><div class="footer-group"><h3 class="footer-title">加入组织</h3><div class="footer-links"><a class="footer-item" target="_blank" href="https://www.boyouquan.com/home">博友圈</a><a class="footer-item" target="_blank" href="https://github.com/timqian/chinese-independent-blogs">中博列表</a><a class="footer-item" target="_blank" href="https://blogwe.com/">博客我们</a><a class="footer-item" target="_blank" href="https://storeweb.cn/">个性商店</a><a class="footer-item" target="_blank" href="https://bf.zzxworld.com/">发现博客</a><a class="footer-item" target="_blank" href="https://ourblo.gs/">OurBlogs</a></div></div><div class="footer-group"><h3 class="footer-title">文章整理</h3><div class="footer-links"><a class="footer-item" href="/categories/website/">博客管理</a><a class="footer-item" href="/categories/learning/">学习资料</a><a class="footer-item" href="/categories/daily-share/">日常分享</a><a class="footer-item" href="/archives/">时光卷轴</a><a class="footer-item" href="/charts/">文章通览</a><a class="footer-item" href="/categories/">查看全部</a></div></div><div class="footer-group"><h3 class="footer-title">文章标签</h3><div class="footer-links"><a class="footer-item" href="/tags/JavaScript/">JS知识</a><a class="footer-item" href="/tags/Hexo/">本站框架</a><a class="footer-item" href="/tags/机器学习/">机器学习</a><a class="footer-item" href="/tags/日记/">个人日记</a><a class="footer-item" href="/tags/CSS/">CSS知识</a><a class="footer-item" href="/tags/">查看全部</a></div></div><div class="footer-group"><h3 class="footer-title">自建工具</h3><div class="footer-links"><a class="footer-item" target="_blank" rel="noopener" href="https://chat.liushen.fun/">清羽AI</a><a class="footer-item" target="_blank" rel="noopener" href="https://hot.liushen.fun/">今日热榜</a><a class="footer-item" target="_blank" rel="noopener" href="https://cover.qyliu.top/">封面设计</a><a class="footer-item" target="_blank" rel="noopener" href="https://icon.qyliu.top/">万变图标</a><a class="footer-item" target="_blank" rel="noopener" href="https://tmail.qyliu.top/">临时邮箱</a><a class="footer-item" target="_blank" rel="noopener" href="https://share.liushen.fun/">内容中转</a></div></div><div class="footer-group" id="friend-links-in-footer"><h3 class="footer-title">友链<button title="换一批" href="javascript:;" onclick="liushen.randomLink()"><i class="fa-solid fa-rotate-right"></i></button></h3><div class="footer-links"><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试1</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试2</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试3</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试4</a><a class="footer-item" target="_blank" href="https://blog.liushen.fun">测试5</a><a class="footer-item" href="/link/" data-pjax-state="data-pjax-state">查看更多</a></div></div></div><div id="footer-bottom"><div class="footer-bottom-content"><div class="footer-bottom-left"><span class="copyright">©2021 - 2025 By <a target="_blank" rel="noopener" href="https://blog.liushen.fun/about/" title="点击访问&quot;LiuShen&quot;的主页" style="margin-left:5px">LiuShen</a></span><div><a class="footer-bottom-link" target="_blank" href="https://beian.miit.gov.cn/" rel="noopener external nofollow" title="工信部备案号">陕ICP备2024028531号-2</a><a class="footer-bottom-link" target="_blank" href="https://beian.mps.gov.cn/#/query/webSearch?code=61011602000637" rel="noopener external nofollow" title="公安备案号">陕公网安备61011602000637号</a></div></div><div class="footer-bottom-right"><div id="runtime" title="本站运行时间">本站已苟活：0 天 0 时 0 分 0 秒</div><div><a class="footer-bottom-link" target="_blank" href="https://www.dogecloud.com/?iuid=9173" rel="noopener external nofollow" title="本站通过多吉云CDN提供站点加速">多吉云CDN</a><a class="footer-bottom-link" target="_blank" href="https://hexo.io/zh-cn/" rel="noopener external nofollow" title="本站使用Hexo架构搭建而成">Hexo静态框架</a><a class="footer-bottom-link" target="_blank" href="https://butterfly.js.org/" rel="noopener external nofollow" title="本站主题由Butterfly主题魔改而成">LiuShen主题</a></div></div></div></div></div><script>window.liushen||(window.liushen={saveData:(e,n)=>{localStorage.setItem(e,JSON.stringify({time:Date.now(),data:n}))},loadData:(e,n)=>{let t=JSON.parse(localStorage.getItem(e));if(t){let e=Date.now()-t.time;if(e>=0&&e<6e4*n)return t.data}return null},runtime:()=>{const e=e=>e>9?e:"0"+e,n=new Date("2021/12/12 01:27:36").getTime(),t=Date.now();let i=Math.round((t-n)/1e3),o="本站已苟活：";i>=86400&&(o+=`${e(Math.floor(i/86400))} 天 `,i%=86400),i>=3600&&(o+=`${e(Math.floor(i/3600))} 时 `,i%=3600),i>=60&&(o+=`${e(Math.floor(i/60))} 分 `,i%=60),o+=`${e(i)} 秒`;const l=document.getElementById("runtime");l&&(l.innerHTML=o),setTimeout(window.liushen.runtime,1e3)},randomLink:()=>{let e=window.liushen.loadData("links",30);if(e){let n=document.querySelectorAll("#friend-links-in-footer .footer-item");if(!n.length)return;for(let t=0;t<n.length;t++){let i=Math.floor(Math.random()*e.length);n[t].innerText=e[i].name,n[t].href=e[i].link,e.splice(i,1)}}else fetch("/flink_count.json").then((e=>e.json())).then((e=>{window.liushen.saveData("links",e.link_list),window.liushen.randomLink()}))}}),window.liushen.randomLink(),document.addEventListener("DOMContentLoaded",window.liushen.randomLink),window.liushen.runtime()</script></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="translateLink" type="button" title="简繁转换" style="width:35px">繁</button><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i><span class="rightside-text">阅读模式</span></button><button id="darkmode" type="button" title="日间和夜间模式切换"><i class="fa-regular fa-star-half-stroke"></i><span class="rightside-text">亮暗切换</span></button><button id="cat" onclick="toggleLive2dVisibility()" title="小猫显隐"><i class="fa-solid fa-cat"></i><span class="rightside-text">小猫显隐</span></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fa-solid fa-arrows-left-right-to-line"></i><span class="rightside-text">侧栏显隐</span></button></div><div id="rightside-config-show"><button id="rightside-config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i><span class="rightside-text">更多设置</span></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i><span class="rightside-text">显示目录</span></button><button id="fullscreen" onclick="toggleFullScreen()" title="全屏切换"><i class="fa-solid fa-expand"></i><span class="rightside-text">全屏切换</span></button><a id="to_comment" href="#post-comment" title="前往评论"><i class="fas fa-comments"></i><span class="rightside-text">快速评论</span></a><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i><span class="rightside-text">回到顶部</span></button></div></div><div id="rightMenu"><div class="rightMenu-group rightMenu-small"><div class="rightMenu-item" id="menu-backward"><i class="fa-solid fa-arrow-left"></i></div><div class="rightMenu-item" id="menu-forward"><i class="fa-solid fa-arrow-right"></i></div><div class="rightMenu-item" id="menu-refresh"><i class="fa-solid fa-arrow-rotate-right"></i></div><div class="rightMenu-item" id="menu-home"><i class="fa-solid fa-house"></i></div></div><div class="rightMenu-group rightMenu-line hide" id="menu-text"><a class="rightMenu-item" id="copy" href="javascript:rm.copySelect();"><i class="fa-solid fa-copy"></i><span>复制选中文字</span></a><a class="rightMenu-item" id="reply" href="javascript:rm.replySelect();"><i class="fa-regular fa-comment"></i><span>评论选中段落</span></a></div><div class="rightMenu-group rightMenu-line rightMenuOther"><a class="rightMenu-item menu-link" href="/archives/"><i class="fa-solid fa-archive"></i><span>文章时间线</span></a><a class="rightMenu-item menu-link" href="/categories/"><i class="fa-solid fa-folder-open"></i><span>文章分大类</span></a><a class="rightMenu-item menu-link" href="/tags/"><i class="fa-solid fa-tags"></i><span>文章小标签</span></a></div><div class="rightMenu-group rightMenu-line rightMenuNormal"><a class="rightMenu-item menu-link" id="menu-radompage" href="/comment/"><i class="fa-solid fa-shoe-prints"></i><span>随心留言板</span></a><div class="rightMenu-item" id="menu-translate"><i class="fa-solid fa-earth-asia"></i><span>繁简模式切换</span></div><div class="rightMenu-item" id="menu-live2dvisibility"><i class="fa-solid fa-cat"></i><span>小猫显示隐藏</span></div><div class="rightMenu-item" id="menu-print"><i class="fa-solid fa-print fa-fw"></i><span>打印整个页面</span></div><a class="rightMenu-item menu-link" id="statement" href="/statement/"><i class="fa-regular fa-copyright fa-fw"></i><span>网站声明</span></a></div></div><div id="rightmenu-mask"></div><div><script src="/js/others.js?v=5.0.0"></script><script src="/js/utils.js?v=5.0.0"></script><script src="/js/main.js?v=5.0.0"></script><script src="https://jsd.liiiu.cn/npm/echarts@5.5.1/dist/echarts.simple.min.js"></script><script src="/js/rightmenu.js?v=5.0.0"></script><script src="/js/jinrishici.js"></script><script src="/js/tw_cn.js?v=5.0.0"></script><script src="https://jsd.liiiu.cn/npm/@fancyapps/ui@5.0.36/dist/fancybox/fancybox.umd.min.js"></script><script src="https://jsd.liiiu.cn/npm/instant.page@5.2.0/instantpage.min.js" type="module"></script><script src="https://jsd.liiiu.cn/npm/vanilla-lazyload@19.1.3/dist/lazyload.iife.min.js"></script><div class="js-pjax"><script>(()=>{let t=null;const e=null,o="shuoshuo"===GLOBAL_CONFIG_SITE.pageType,a=()=>{t&&(t.destroy(),t=null)},n=e=>t&&t.setDarkMode("dark"===e),l=(l=document,i=location.pathname)=>{t=Artalk.init({el:l.querySelector("#artalk-wrap"),server:"https://atk.liushen.fun",site:"清羽飞扬",darkMode:"dark"===document.documentElement.getAttribute("data-theme"),...e,pageKey:i,imgUploader:function(t){let e="Bearer 28|q18njD3pLtHiFy9WidqQrREwqZzb8Zionr8WzilI",o="https://www.baiwulin.work/api/v1/upload",a=new Headers;a.set("Accept","application/json"),a.set("Authorization",e);let n=new FormData;n.append("file",t);const l=(t,e,o)=>fetch(t,{method:"POST",body:e,headers:o}).then((t=>t.json())).then((t=>t.data.links.url)).catch((t=>(console.error("Image upload failed:",t),null)));return l(o,n,a).then((t=>t||(console.warn("雾林图床接口失败，尝试替换为秋叶图床"),e="Bearer 11|lsReISlSS0dyhDzt35ovtfYefGbWSRW2vvntPXs7",o="https://imgse.koxiuqiu.cc/api/v1/upload",a.set("Authorization",e),l(o,n,a))))}}),"null"!==GLOBAL_CONFIG.lightbox&&(t.on("list-loaded",(()=>{t.ctx.get("list").getCommentNodes().forEach((t=>{const e=t.getRender().$content;btf.loadLightbox(e.querySelectorAll("img:not([atk-emoticon])"))}))})),o&&(window.shuoshuoComment.destroyArtalk=()=>{a(),l.children.length&&(l.innerHTML="",l.classList.add("no-comment"))}),btf.addGlobalFn("pjaxSendOnce",a,"destroyArtalk"),btf.addGlobalFn("themeChange",n,"artalk"))},i=async(t,e)=>{"object"==typeof Artalk||(await btf.getCSS("https://jsd.liiiu.cn/npm/artalk@2.9.1/dist/Artalk.min.css"),await btf.getScript("https://jsd.liiiu.cn/npm/artalk@2.9.1/dist/Artalk.min.js")),l(t,e)};o?window.shuoshuoComment={loadComment:i}:setTimeout(i,0)})()</script></div><script>window.newestComments={changeContent:e=>(""===e||(e=(e=(e=(e=(e=e.replace(/<img.*?src="(.*?)"?[^\>]+>/gi,"[图片]")).replace(/<a[^>]+?href=["']?([^"']+)["']?[^>]*>([^<]+)<\/a>/gi,"[链接]")).replace(/<pre><code>.*?<\/pre>/gi,"[代码]")).replace(/<code>.*?<\/code>/gi,"[代码]")).replace(/<[^>]+>/g,"")).length>150&&(e=e.substring(0,150)+"..."),e),generateHtml:(e,t)=>{let n="";if(e.length)for(let t=0;t<e.length;t++){if(n+='<div class="aside-list-item">',e[t].avatar){const a="data-lazy-src";n+=`<a href="${e[t].url}" class="thumbnail"><img ${a}="${e[t].avatar}" alt="${e[t].nick}"></a>`}n+=`<div class="content">\n        <a class="comment" href="${e[t].url}" title="${e[t].content}">${e[t].content}</a>\n        <div class="name"><span>${e[t].nick} / </span><time datetime="${e[t].date}">${btf.diffDate(e[t].date,!0)}</time></div>\n        </div></div>`}else n+="暂无评论";t.innerHTML=n,window.lazyLoadInstance&&window.lazyLoadInstance.update(),window.pjax&&window.pjax.refresh(t)},newestCommentInit:(e,t)=>{const n=document.querySelector("#card-newest-comments .aside-list");if(n){const a=btf.saveToLocal.get(e);a?newestComments.generateHtml(JSON.parse(a),n):t(n)}},run:(e,t)=>{newestComments.newestCommentInit(e,t),btf.addGlobalFn("pjaxComplete",(()=>newestComments.newestCommentInit(e,t)),e)}}</script><script>window.addEventListener("load",(()=>{const t="artalk-newest-comments",{changeContent:a,generateHtml:e,run:n}=window.newestComments,r=new URLSearchParams({site_name:"清羽飞扬",limit:"5"});n(t,(async n=>{try{const s=await fetch(`https://atk.liushen.fun/api/v2/stats/latest_comments?${r}`),o=await s.json(),{avatarCdn:c,avatarDefault:i}=await(async()=>{const t=t=>t.startsWith("d=")?t:`d=${t}`;try{const a=await fetch("https://atk.liushen.fun/api/v2/conf"),e=await a.json(),{mirror:n,params:r,default:s}=e.frontend_conf.gravatar;return{avatarCdn:n,avatarDefault:t(r||s)}}catch(a){return console.error(a),{avatarCdn:"",avatarDefault:t("")}}})(),l=o.data.map((t=>({avatar:c&&t.email_encrypted?`${c}${t.email_encrypted}?${i}`:"",content:a(t.content_marked),nick:t.nick,url:t.page_url,date:t.date})));btf.saveToLocal.set(t,JSON.stringify(l),10/1440),e(l,n)}catch(t){console.log(t),n.textContent="无法获取评论，请确认相关配置是否正确"}}))}))</script><script src="/config/memos/memos.js"></script><script id="canvas_nest" defer color="128,128,128" opacity="0.7" zindex="-1" count="99" mobile="false" src="https://jsd.liiiu.cn/npm/butterfly-extsrc@1.1.4/dist/canvas-nest.min.js"></script><link rel="stylesheet" href="https://jsd.liiiu.cn/npm/aplayer@1.10.1/dist/APlayer.min.css" media="print" onload='this.media="all"'><script src="https://jsd.liiiu.cn/npm/aplayer@1.10.1/dist/APlayer.min.js"></script><script src="https://jsd.liiiu.cn/npm/meting@2.0.1/dist/Meting.min.js"></script><script src="https://jsd.liiiu.cn/npm/pjax@0.2.8/pjax.min.js"></script><script>(()=>{window.pjax=new Pjax({elements:'a:not([target="_blank"])',selectors:["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show",".js-pjax"],cacheBust:!1,analytics:!1,scrollRestoration:!1});const e=e=>{e&&Object.values(e).forEach((e=>e()))};document.addEventListener("pjax:send",(()=>{btf.removeGlobalFnEvent("pjaxSendOnce"),btf.removeGlobalFnEvent("themeChange");const t=document.body.classList;t.contains("read-mode")&&t.remove("read-mode"),e(window.globalFn.pjaxSend)})),document.addEventListener("pjax:complete",(()=>{btf.removeGlobalFnEvent("pjaxCompleteOnce"),document.querySelectorAll("script[data-pjax]").forEach((e=>{const t=document.createElement("script"),n=e.text||e.textContent||e.innerHTML||"";Array.from(e.attributes).forEach((e=>t.setAttribute(e.name,e.value))),t.appendChild(document.createTextNode(n)),e.parentNode.replaceChild(t,e)})),e(window.globalFn.pjaxComplete)})),document.addEventListener("pjax:error",(e=>{404===e.request.status&&pjax.loadUrl("/404")}))})()</script><script async data-pjax="" src="/config/busuanzi/busuanzi.js"></script><div id="algolia-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="search-wrap"><div id="algolia-search-input"></div><hr><div id="algolia-search-results"><div id="algolia-hits"></div><div id="algolia-pagination"></div><div id="algolia-info"><div class="algolia-stats"></div><div class="algolia-poweredBy"></div></div></div></div></div><div id="search-mask"></div><script src="https://jsd.liiiu.cn/npm/algoliasearch@5.8.1/dist/lite/builds/browser.umd.min.js"></script><script src="https://jsd.liiiu.cn/npm/instantsearch.js@4.75.0/dist/instantsearch.production.min.js"></script><script src="/js/search/algolia.js?v=5.0.0"></script></div></div><div class="needEndHide" id="nav-music"><div id="nav-music-hoverTips" onclick="liuMusic.musicToggle()">音乐已暂停</div><meting-js id="13597135963" server="netease" type="playlist" mutex="true" preload="none" data-lrctype="0" order="random" volume="0.8" api="https://met.liiiu.cn/meting/api?server=:server&amp;type=:type&amp;id=:id&amp;r=:r"></meting-js></div><script data-pjax="">function butterfly_swiper_injector_config(){var a=document.getElementById("recent-posts");console.log("已挂载butterfly_swiper"),a.insertAdjacentHTML("afterbegin",'<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/4bb33804/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/04/08/67f49876a62e5.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-04-08</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/4bb33804/&quot;);" href="javascript:void(0);" alt="">PaddleYOLO训练自己的数据集</a><div class="blog-slider__text">近期一直在研究毕业设计，在其中，我涉及到了PaddleYOLO的训练和部署，在网上的教程较少，经过不断努力，我也算是跑出来了，所以在这里分享出来做个记录，防止下次使用又忘记了怎么搞。</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/4bb33804/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/5f71a4b1/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/04/27/680dc7916ef34.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-04-28</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/5f71a4b1/&quot;);" href="javascript:void(0);" alt="">耗子面板和DPanel简单体验</a><div class="blog-slider__text">最近毕业设计临近尾声，代码也敲完了，目前就剩稍微的调优，就可以开始写论文啦！在闲暇时间，我也尝试部署了一些不一样的面板程序，总感觉1panel稍微有些复杂，很多功能并用不上，比如GPU，下面简单分享一下我的体验。</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/5f71a4b1/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/40702a0d/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/05/06/6819cd4532457.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-05-07</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/40702a0d/&quot;);" href="javascript:void(0);" alt="">本地实现HEXO文章AI摘要</a><div class="blog-slider__text">五一假期结束啦！这五天啥也没干，就在宿舍敲代码，都快无聊死了，恰逢找到了一些免费API，就自己实现一个AI摘要吧！利用API生成摘要文本放在文章头部，再通过hexo进行渲染就好啦！</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/40702a0d/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/7915ee6b/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/05/25/6832cc105bc41.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-05-25</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/7915ee6b/&quot;);" href="javascript:void(0);" alt="">数据库可视化WEB工具对比</a><div class="blog-slider__text">最近迁移服务器，并且搞了一个1P专业版玩玩，感觉效果很不错，想找一个管理数据库的服务，其中看了phpmyadmin等一些知名项目，但是都不太符合我的要求，最后经过筛选，找到了比较合适的，分享给大家！</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/7915ee6b/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/caee2d9f/&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://p.liiiu.cn/i/2025/04/18/68024a618942b.webp" alt="" onerror="this.src=/img/error-page.png; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2025-04-18</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/caee2d9f/&quot;);" href="javascript:void(0);" alt="">美化你的RSS订阅地址</a><div class="blog-slider__text">近期天天忙着毕业设计，冷落了站点文章的更新，最近也终于算是快要搞完了，于是开始捣鼓一些好玩的东西，在浏览阮一峰大佬的周刊时，了解到了RSS也能美化，折腾了一下，没想到还真实现了，在此分享一下。</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/caee2d9f/&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>')}for(var elist="null".split(","),cpage=location.pathname,epage="/",flag=0,i=0;i<elist.length;i++)cpage.includes(elist[i])&&flag++;("all"===epage&&0==flag||epage===cpage)&&butterfly_swiper_injector_config()</script><script defer src="https://jsd.liiiu.cn/npm/swiper@11.1.14/swiper-bundle.min.js"></script><script defer data-pjax="" src="/config/swiper/swiper_init.js"></script><script src="https://jsd.liiiu.cn/npm/live2d-widget@^3.1.3/lib/L2Dwidget.min.js"></script><script>L2Dwidget.init({pluginModelPath:"assets/",model:{scale:1,hHeadPos:.5,vHeadPos:.618,jsonPath:"/live2dw/assets/tororo.model.json"},display:{superSample:2,width:250,height:500,position:"left",hOffset:-20,vOffset:-90},mobile:{show:!1,scale:.5},react:{opacityDefault:.7,opacityOnHover:.2},log:!1,pluginJsPath:"lib/",pluginRootPath:"live2dw/",tagMode:!1})</script></body></html>